
<%@page import="fu.abc.model.Account"%>
<%@page import="fu.abc.DAO.AccountDAO"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>Vnplace - Thông tin tài khoản</title>
	
	<!-- CSS -->
	<link href="css/transdmin.css" rel="stylesheet" type="text/css" media="screen" />
		
	<!-- JavaScripts-->
	<script type="text/javascript" src="style/js/jquery.js"></script>
	<script type="text/javascript" src="style/js/jNice.js"></script>

	<script>
		function del_confirm(msg,url)
		{
		    if(confirm(msg))
		    {
		        window.location.href=url;
		    }
		    else
		    {
		        false;
		    }
		}
	</script>

		<style>
		body {
			font-size: 15px
		}
		
		#header {
			height: 60px;
			width: max;
			background: #19A3A3;
			color: white;
		}
		
		a.logout {
			list-style: none;
			font-size: 15px;
			float: right;
			padding-top: 22px;
			text-decoration: none;
			color: white;
			margin-right: 20px;
		}
		
		a.logout:hover {
			color: #E6E6B8;
			text-decoration: underline;
			font-size: 16px;
		}
		
		p.hello {
			float: right;
			font-size: 15px;
			margin-right: 30px;
			padding-top: 22px;
		}
		
		li.createacc {
			background: #B2E0E0;
		}
		input.save{
			width: 80px;
			background: #19A3A3;
			border: thin;
			color: white;
			font-size: 1em;
		}
		input.cancel {
			background: #19A3A3;
			border: thin;
			color: white;
			font-size: 1em;
		}
		</style>
</head>

<body>
	<div id="wrapper">
		<!-- h1 tag stays for the logo, you can use the a tag for linking the index page -->
		<div id="header">
			<%
				String acc = (String) session.getAttribute("acc");
			%>
			<b><a href="logout.jsp" class="logout">Đăng xuất</a></b>
			<%
				if (acc == null) {
						response.sendRedirect("/Vnplace/systemAdmin/login.jsp");
					} else {
			%>
			<p class="hello">
				Chào <b><%=acc%></b>
			</p>
			<%
				}
			%>
		</div>
		<!-- // #end mainNav -->

		<div id="containerHolder">
			<h1>Hệ thống quản lý</h1>
			<div id="container">
				<div id="sidebar">
					<ul class="sideNav">
						<li><a href="systemAdmin.jsp">Trang chủ</a></li>
						<li><a href="manageAccount.jsp">Quản lý tài khoản</a></li>
<!-- 						<li class="createacc"><a href="createAccount.jsp">Quản lý nhóm địa điểm</a></li> -->
					</ul>
					<!-- // .sideNav -->
				</div>
				<!-- // #sidebar -->

				<!-- h2 stays for breadcrumbs -->
				<%
					int id = Integer.parseInt(request.getParameter("idAcc"));
							AccountDAO manage = new AccountDAO();
							Account a = manage.getAccountInfor(id);
				%>
				<div id="main">
					<form action="" class="jNice">
						<input type="hidden" value="<%=a.getIdAcc()%>"></input>
						<fieldset>
							<legend>Thông tin tài khoản</legend>
							<table>
								<tr>
									<td align="center" width="300px" colspan=2> <b>Thông tin tài khoản</b></td>
<!-- 									<td></td> -->
								</tr>
								<tr>
									<td align="right">Họ và tên:</td>
									<td><%=a.getFullname() %></td>
								</tr>
								<tr>
									<td align="right">Ngày Sinh:</td>
									<td><%=a.getDob() %></td>
								</tr>
								<tr>
									<td align="right">Địa chỉ:</td>
									<td><%=a.getAddress() %></td>
								</tr>
								<tr>
									<td align="right">Số CMND:</td>
									<td><%=a.getCmt() %></td>
								</tr>
								<tr>
									<td align="right">Email:</td>
									<td><%=a.getEmail() %></td>
								</tr>
								<tr>
									<td align="right">Số Điện Thoại:</td>
									<td><%=a.getPhone() %></td>
								</tr>
								<tr>
									<td align="right">Tài khoản:</td>
									<td><%=a.getUsername() %></td>
								</tr>

								<tr>
									<td align="right">Vai trò:</td>
									<td><%=a.getRole() %></td>
								</tr>
								<tr>
									<td align="right"></td>
									<td>
										<input type="button" name="edit" value="Chỉnh sửa" class="save" onclick="window.location='editAccount.jsp?idacc=<%=a.getIdAcc()%>'" />
<!-- 										<input type="button" name="delete" value="Hủy" class="cancel" onclick="window.location='manageAccount.jsp'"></input> -->
										<input type="button" name="delete" value="Hủy tài khoản" class="cancel"
										onclick="del_confirm('Bạn có chắc chắn muốn hủy tài khoản này không?','/Vnplace/CancelAccount?idacc=<%=a.getIdAcc()%>')" /></td>
								</tr>
							</table>
						</fieldset>

					</form>
				</div>
				<!-- // #main -->

				<div class="clear"></div>
			</div>
			<!-- // #container -->
		</div>
		<!-- // #containerHolder -->
		<div id="footer">
			<p class="copyright">©Copyright 2014 VnPlace.vn</p>
		</div>
	</div>
	<!-- // #wrapper -->
</body>
</html>




